﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace PositiveIntegers
{
    class Program
    {
        static void Main(string[] args)
        {
            //Write a program that extracts from given text all positive integer numbers and stores them in a string array. Use Regex.Split.

            Regex regex = new Regex(@"[0-9]+");
            String text =
              "as gf 34 dasg 426 mwesdgsd 123 32 2fdg 34 ";
            string splitPattern = @"[;|,|\s|\|a-z|A-Z]+";
            string[] numbers = Regex.Split(text, splitPattern);
            foreach (var number in numbers)
            {
                if (number!="")
                {
                Console.Write(number+" ");
                }
            }

        }
    }
}
